-- background: 9564 from stack: in -- bmap block id: 0 -- flags: 4000 -- background id: 0 -- name: Cursors ----- HyperTalk script ----- on openCard if fld curButton <> "" then set the highlight of card button id (background field curButton) to false put "" into fld curButton end if end openCard on AddNewCard name global buttonId set lockscreen to true put background field "Number" into ix if ix = 20 then doMenu "New Card" put 0 into background field "Number" put "" into background field "curButton" put "CURS" into background field "resType" end if makeButton put "set name of button id" && buttonId && "to" && quote & name & quote into tmp do tmp set lockscreen to false end AddNewCard function buttonRect num put 30 + (num div 5) * 70 into tv put 75 + (num mod 5) * 70 into th return th & "," & tv & "," & th+60 & "," & tv+60 end buttonRect on makeButton global buttonId put background field "Number" into ix put ix+1 into background field "Number" set visible of background button "protoButton" to true choose button tool click at loc of background button "protoButton" doMenu "Copy Button" doMenu "Paste Button" choose browse tool set visible of background button "protoButton" to false set the rect of last button to buttonRect(ix) put the id of last button into buttonId end makeButton on showCursor curs set the cursor to the short name of the target put the rect of the target into tmp put item 1 of tmp into th put item 2 of tmp into tv put item 3 of tmp into bh put item 4 of tmp into bv repeat put the mouseH into h put the mouseV into v if (h < th) or (h >bh) or (v < tv) or (v >bv) then exit repeat else if the mouse is down then wait until the mouse is up put the mouseH into h put the mouseV into v if (h < th) or (h >bh) or (v < tv) or (v >bv) then exit repeat else buttonHit end if end if end if end repeat end showCursor on hideFields set visible of background field "Number" to false set visible of background field "curButton" to false set visible of background button "protoButton" to false end hideFields on showFields set visible of background field "Number" to true set visible of background field "curButton" to true set visible of background button "protoButton" to true end showFields -- part 1 (button) -- low flags: 80 -- high flags: 0001 -- rect: left=7 top=304 right=335 bottom=35 -- title width / last selected line: 0 -- icon id / first selected line: 3835 / 3835 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Prev ----- HyperTalk script ----- on mouseUp go to previous card of this background end mouseUp -- part 2 (button) -- low flags: 80 -- high flags: 0001 -- rect: left=476 top=305 right=336 bottom=504 -- title width / last selected line: 0 -- icon id / first selected line: 29484 / 29484 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Next ----- HyperTalk script ----- on mouseUp go to next card of this background end mouseUp -- part 3 (button) -- low flags: 00 -- high flags: 0001 -- rect: left=475 top=26 right=59 bottom=504 -- title width / last selected line: 0 -- icon id / first selected line: 21700 / 21700 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Home ----- HyperTalk script ----- on mouseUp go home end mouseUp -- part 4 (button) -- low flags: 00 -- high flags: 0001 -- rect: left=475 top=60 right=93 bottom=504 -- title width / last selected line: 0 -- icon id / first selected line: 24317 / 24317 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Welcome ----- HyperTalk script ----- on mouseUp go to card "Welcome" end mouseUp -- part 5 (button) -- low flags: 00 -- high flags: 8003 -- rect: left=423 top=162 right=187 bottom=507 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Functions ----- HyperTalk script ----- on mouseUp go to first card of background "Functions" end mouseUp -- part 6 (button) -- low flags: 00 -- high flags: 8003 -- rect: left=423 top=133 right=158 bottom=507 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Commands ----- HyperTalk script ----- on mouseUp go to first card of background "Commands" end mouseUp -- part 7 (button) -- low flags: 00 -- high flags: 8003 -- rect: left=423 top=220 right=245 bottom=507 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Sounds ----- HyperTalk script ----- on mouseUp go to first card of background "Sounds" end mouseUp -- part 8 (button) -- low flags: 00 -- high flags: 8003 -- rect: left=423 top=249 right=274 bottom=507 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Add ----- HyperTalk script ----- on mouseUp go to card "Add" end mouseUp -- part 9 (button) -- low flags: 80 -- high flags: 8003 -- rect: left=2 top=123 right=145 bottom=102 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 3 -- text size: 9 -- style flags: 0 -- line height: 12 -- part name: protoButton ----- HyperTalk script ----- on mouseUp buttonHit end mouseUp on mouseEnter showCursor end mouseEnter -- part 10 (field) -- low flags: 00 -- high flags: 0000 -- rect: left=6 top=30 right=53 bottom=58 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 14 -- style flags: 256 -- line height: 18 -- part name: resType -- part 11 (field) -- low flags: 80 -- high flags: 0002 -- rect: left=8 top=61 right=80 bottom=48 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Number -- part 12 (field) -- low flags: 80 -- high flags: 0002 -- rect: left=3 top=91 right=112 bottom=87 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: curButton -- part 14 (button) -- low flags: 00 -- high flags: 8003 -- rect: left=102 top=306 right=331 bottom=199 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Paste ----- HyperTalk script ----- on mouseUp if background field "curButton" = "" then answer "You must select a CURS first!" with "Oops" exit mouseUp end if put background field resType && the short name of card button id (background field "curButton") & return into tmp go to card "Paste" put tmp after card field "ToPaste" end mouseUp -- part 15 (button) -- low flags: 00 -- high flags: A003 -- rect: left=206 top=306 right=331 bottom=296 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Rename ----- HyperTalk script ----- on mouseUp butRename end mouseUp -- part 16 (button) -- low flags: 00 -- high flags: 8003 -- rect: left=303 top=306 right=331 bottom=397 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Delete ----- HyperTalk script ----- on mouseUp butDelete end mouseUp -- part 17 (button) -- low flags: 00 -- high flags: 8003 -- rect: left=423 top=191 right=216 bottom=507 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Icons ----- HyperTalk script ----- on mouseUp go to first card of background "Icons" end mouseUp -- part 18 (button) -- low flags: 80 -- high flags: 0001 -- rect: left=2 top=256 right=300 bottom=43 -- title width / last selected line: 0 -- icon id / first selected line: 32670 / 32670 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Scan ----- HyperTalk script ----- on mouseUp repeat until the mouseClick visual effect dissolve go to next card of this background end repeat end mouseUp -- part 20 (button) -- low flags: 00 -- high flags: 0001 -- rect: left=2 top=210 right=254 bottom=43 -- title width / last selected line: 0 -- icon id / first selected line: 20186 / 20186 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Sort ----- HyperTalk script ----- on mouseUp lock screen put "" into names put the number of cds in this bg into cnum repeat for cnum set cursor to busy repeat with i = 1 to fld "Number" put the short name of btn i & return after names end repeat go next cd of this bg end repeat put SortLines(names) into names put the short name of this bg into back repeat for (cnum - 1) set cursor to busy go last cd of bg back doMenu "Delete Card" end repeat go cd 1 of bg back choose button tool put fld "Number" into n repeat with i = 1 to n set cursor to busy click at loc of btn (n-i+1) doMenu "Clear Button" end repeat choose browse tool put 0 into fld "Number" put "" into fld curButton repeat with i = 1 to number of lines in names set cursor to busy AddNewCard (line i of names) end repeat go cd 1 of this bg set cursor to hand unlock screen end mouseUp